import yaml
from jinja2 import Template

def get_yaml(path, ext=None):
    """
    提取yaml文件内容
    :param ext:
    :param path: yaml文件地址
    :return:
    """
    if ext is None:
        ext = {}
    with open(path, 'r', encoding='utf-8') as y:
        steps = y.read()
        template = Template(steps).render(**ext)
        steps = yaml.safe_load(template)
        return steps



